package easy;

public class Solution_1332 {

    public int removePalindromeSub(String s) {
        return new StringBuffer(s).reverse().toString().equals(s) ? 1 : 2;
    }

    public static void main(String[] args) {
        Solution_1332 model = new Solution_1332();
        System.out.println(model.removePalindromeSub("ababa"));
        System.out.println(model.removePalindromeSub("abb"));
        System.out.println(model.removePalindromeSub("baabb"));
        System.out.println(model.removePalindromeSub("a"));
        System.out.println(model.removePalindromeSub("bbaabaaa"));
    }
}
